<script id="template-semiauto-executor" type="text/html">
    <div class="siluResult-box semiauto-executor">
        <table class="object-info">
            <tr>
                <td style="padding:10px;text-align:center;">思路条件及优化动作</td>
                <td>
                    <div class="silu-filters"></div>
                </td>
            </tr>
        </table>
        <div class="toolbar">
            <div class="btn-box inline-block">
                <a href="javascript:;;;" class="btn btn3 btn_grey button executeAction" data-semiauto_id="<%=semiauto_id%>">执行思路</a>
            </div>
            <div class="inline-block" style="float:right;">
                <div class="paging-box paging-full" id="page_html" style="margin-right:20px;"></div>
            </div>
        </div>
        <div class="keywords-container">
            <table cellpadding="0" cellspacing="0" border="0" class="metrotable datatable">
                <thead id="">
                <tr>
                    <th width="10%" class="sorting" data-sort="modifiedStatus">关键词(<span id="resCount">?</span>个)</th>
                    <th width="10%">推广单元名称</th>
                    <th class="sorting sorting_desc" data-sort="impressions">展现量</th>
                    <th class="sorting" data-sort="click">点击量</th>
                    <th class="sorting" data-sort="ctr">点击率</th>
                    <th class="sorting" data-sort="cpc">平均点击花费</th>
                    <th class="sorting" data-sort="cvr">点击转化率</th>
                    <th class="sorting" data-sort="avgpos">宝贝排名</th>
                    <th class="sorting" data-sort="qscore">计算机质量得分</th>
                    <th class="sorting" data-sort="wireless_qscore">移动质量得分</th>
                    <th class="sorting" data-sort="cost">总花费</th>
                    <th class="sorting" data-sort="sales">总成交金额</th>
                    <th class="sorting" data-sort="total_pay_count">总成交笔数</th>
                    <th class="sorting" data-sort="roi">投入产出比</th>
                    <th class="sorting" data-sort="fav_count">总收藏数</th>
                    <th class="sorting" data-sort="fav_count_rate">收藏率</th>
                    <th class="sorting" data-sort="cart_total">购物车数</th>
                    <th class="sorting" data-sort="cart_total_rate">购物车率</th>
                    <th class="sorting" data-sort="max_price">调整后出价</th>
                </tr>
                </thead>
                <tbody id="siluResult-list-tr"></tbody>
            </table>
        </div>
    </div>
</script>

<script id="template-semiauto-executor-keywords" type="text/html">
    <% if(total_items > 0) {
        for (var i = 0; i < total_items; i++) { %>
    <tr data-campaign_id="<%= items[i].campaign_id%>" data-adgroup_id="<%= items[i].adgroup_id%>" data-keyword_id="<%= items[i].keyword_id%>">
        <td class="center num word <% if(items[i].executed) { %>red<% } %>"><% if(items[i].new_matchscope == 1) { %>[<% } else if(items[i].new_matchscope == 2) { %><%== '"'%><% } %><%= items[i].word %><% if(items[i].new_matchscope == 1) { %>]<% } else if(items[i].new_matchscope == 2) { %><%== '"'%><% } %></td>
        <td>
            <div class="imgtxt60">
                <div class="photo">
                    <a class="img60" href="http://item.taobao.com/item.htm?id=<%= items[i].num_iid%>" target="_blank">
                        <img src="<%= items[i].img_url%>" alt="<%= items[i].a_title%>">
                    </a>
                </div>
                <p class="title">
                    <a href="http://item.taobao.com/item.htm?id=<%= items[i].num_iid%>" target="_blank"><%= items[i].a_title%></a>
                </p>
            </div>
        </td>
        <td class="center num"><%= items[i].impressions%></td>
        <td class="center num"><%= items[i].click%></td>
        <td class="center num"><%= items[i].ctr%>%</td>
        <td class="center num"><%= items[i].cpc%></td>
        <td class="center num"><%= items[i].cvr%>%</td>
        <td class="center num"><%= items[i].avgpos%></td>
        <td class="center num"><%= items[i].qscore%></td>
        <td class="center num"><%= (items[i].wireless_qscore > 0 ) ? items[i].wireless_qscore : "--"%></td>
        <td class="center num">￥<%= items[i].cost%></td>
        <td class="center num">￥<%= items[i].sales%></td>
        <td class="center num"><%= items[i].total_pay_count%></td>
        <td class="center num"><%= items[i].roi%></td>
        <td class="center num"><%= items[i].fav_count%></td>
        <td class="center num"><%= items[i].fav_count_rate%>%</td>
        <td class="center num"><%= items[i].cart_total%></td>
        <td class="center num"><%= items[i].cart_total_rate%>%</td>
        <td class="center num"><%== items[i].new_price ? "<span class=\"red\">￥" + items[i].new_price + "<\/span><br>" : ""%>(原价：￥<%= items[i].max_price%>)</td>
    </tr>
    <% } } else { %>
    <tr>
        <td class="center green" colspan="19">无关键词数据</td>
    </tr>
    <% } %>
</script>